package com.rbac.application.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.rbac.domain.dto.query.UserPageQuery;
import com.rbac.domain.dto.request.UserCreateRequest;
import com.rbac.domain.dto.request.UserUpdateRequest;
import com.rbac.domain.entity.User;

import java.util.List;

public interface UserService extends IService<User> {

    IPage<User> pageUsers(UserPageQuery query);

    User createUser(UserCreateRequest request);

    User updateUser(UserUpdateRequest request);

    void deleteUser(Long id);

    void deleteBatchUsers(List<Long> ids);

    User getUserWithRoles(Long id);

    void assignRoles(Long userId, List<Long> roleIds);

    List<String> getUserPermissions(Long userId);

    void resetPassword(Long id, String newPassword);

    void updateLoginInfo(Long id, String loginIp);
}